import request from '@/request/api'
//1、获取查询list列表
export function operationTicketList(data) {
    return request({
        url: '/eam-service-ticket/operation/queryList',
        method: 'get',
        params: data
    })
}
//2、根据ID获取操作票详情
export function operationTicketDetail(data) {
    return request({
        url: '/eam-service-ticket/operation/queryByOrderId',
        method: 'get',
        params: data
    })
}
//3、上传excel解析
export function uploadExcel(data) {
    return request({
        url: '/eam-service-ticket/operation/excelImpDetStepdet',
        method: 'post',
        data: data
    })
}
//4、保存
export function saveTicket(data) {
    return request({
        url: '/eam-service-ticket/operation/saveOrUpdate',
        method: 'post',
        data: data
    })
}
//5、校验签名
export function verify(data) {
    return request({
        url: '/eam-service-ticket/operation/checkSign',
        method: 'post',
        data: data
    })
}
//6、审批接口
export function toApprove(data) {
    return request({
        url: '/eam-service-ticket/operation/submit',
        method: 'get',
        params: data
    })
}
//7、删除操作票
export function deleteTicket(data) {
    return request({
        url: '/eam-service-ticket/operation/deleteById',
        method: "delete",
        params: data,
    })
}
//8、打印操作票
export function printTicket(data) {
    return request({
        url: '/eam-service-ticket/operation/printOperation.htm',
        method: "get",
        params: data,
    })
}
//9、导出操作步骤
export function exportStep(data) {
    return request({
        url: '/eam-service-ticket/operation/downFactoryExcelDetStepdet',
        method: "post",
        data: data,
        responseType: "blob"
    })
}
//10、导出树结构的操作步骤
export function exportTreeStep(data) {
    return request({
        url: '/eam-service-ticket/operation/downDispatchExcelDetStepdet',
        method: "post",
        data: data,
        responseType: "blob"
    })
}
//11、操作样票列表
export function sampleTicketList(data) {
    return request({
        url: '/eam-service-ticket/fake/OperationFake/queryList',
        method: "post",
        data: data,
    })
}
//12、操作样票详情
export function sampleTicketDetail(id) {
    return request({
        url: '/eam-service-ticket/fake/OperationFake/details',
        method: "get",
        params: { id },
    })
}
//12、操作样票保存和修改
export function saveSampleTicket(data) {
    return request({
        url: '/eam-service-ticket/fake/OperationFake/fakeSave',
        method: "post",
        data: data
    })
}
//12、操作样票保存和修改
export function deleteSampleTicket(id) {
    return request({
        url: '/eam-service-ticket/fake/OperationFake/delete',
        method: "get",
        params: { id },
    })
}
// 13、通过ID查询单条工作票详细数据
export function getWorkTicketDataById(id) {
    return request({
        url: '/eam-service-ticket/work/workticket/getById',
        method: 'get',
        params: { id }
    })
}
